import 'package:flutter/material.dart';
import 'package:fluro/fluro.dart';
import 'package:bookapp/helpers/constants.dart';
import 'package:bookapp/routers/application.dart';
import 'package:flutter_svg/svg.dart';
import 'package:bookapp/helpers/adapt.dart';

class MineNavBar extends StatelessWidget {
  const MineNavBar({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return AppBar(
      title: const Text("我的"),
      centerTitle: true,
      elevation: 0,
      actions: <Widget>[
        IconButton(
          alignment: Alignment.centerLeft,
          onPressed: (){
            Application.getRouter().navigateTo(
              context,
              "/setting",
              transition: TransitionType.native,
            );
          },
          icon: SvgPicture.asset(
            "assets/icon/icon_setting.svg",
            width: Adapt.width(Constants.appBarIconSize + 4.0),
            height: Adapt.height(Constants.appBarIconSize + 4.0),
          ),
        ),
      ],
    );
  }
}

